$OpenBSD: patch-ext_etc_etc_c,v 1.1 2016/07/15 15:39:04 jeremy Exp $

Use shadow versions of password functions.

--- ext/etc/etc.c.orig	Mon Feb  2 05:58:21 2015
+++ ext/etc/etc.c	Tue Jul 12 11:32:17 2016
@@ -173,7 +173,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
     else {
 	uid = getuid();
     }
-    pwd = getpwuid(uid);
+    pwd = getpwuid_shadow(uid);
     if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", (int)uid);
     return setup_passwd(pwd);
 #else
@@ -203,7 +203,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
     struct passwd *pwd;
 
     SafeStringValue(nam);
-    pwd = getpwnam(RSTRING_PTR(nam));
+    pwd = getpwnam_shadow(RSTRING_PTR(nam));
     if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
     return setup_passwd(pwd);
 #else
